import PropTypes from 'prop-types'
import React, { memo } from 'react'
import SectionHeaderWrapper from './style'

const SectionHeader = memo((props) => {
  const {title,subtitle='默认子标题'} = props
  return (
    <SectionHeaderWrapper>
      <div className='title'>{title}</div>
      <div className='subtitle'>{subtitle}</div>
    </SectionHeaderWrapper>
  )
})

SectionHeader.propTypes = {
  title: PropTypes.string,
  subtitle: PropTypes.string

}

export default SectionHeader